#include <iostream>
using namespace std;

int main()
{
	int seconds;
	cin >> seconds;
	cout << seconds / 3600 << " " << (seconds / 60) % 60 << " " << seconds % 60;
	return 0;
}
